def xadd(a, b):
    return a + b


def xsub(a, b):
    return a - b


def xmul(a, b):
    return a * b


def xdiv(a, b):
    if 0 == b:
        return 0
    return a / b

dict_ops = {
    '+': xadd,
    '-': xsub,
    '*': xmul,
    '/': xdiv
}

while True:
    a = float(input('First operand: '))
    b = float(input('Second operand: '))
    c = input('Operator: ').strip()
    r = dict_ops[c](a, b)
    print('Result: {}'.format(r))
